<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\facade\Db;
use think\facade\View;

class GoodsProp {

    public function goods_prop(){
        $rt=Db::table('ecm_goods_prop')->select();
        $rt=$rt->toArray();
        foreach($rt as $k=>$v){
            $info=Db::table('ecm_goods_prop_value')->field('prop_value')->where("vid in ({$v['pvalues']})")->select();
            $arr=[];
            foreach($info as $i){
                $arr[]=$i['prop_value'];
                $a=implode(',',$arr);
                $rt[$k]['pvalues']=$a;
            }
        }
        View::assign('rt',$rt);
        return  View::fetch();

    }


}